import ajax from './ajax1'

export function contractListApi () {
  return ajax({
    url: 'contract/'
  })
}

export function getContractApi (id) {
  return ajax({
    url: 'contract/' + id
  })
}

export function editSignApi (id, status) {
  return ajax({
    url: 'contract/' + id,
    method: 'patch',
    data: {
      status
    }
  })
}

export function TaskListApi () {
  return ajax({
    url: 'task'
  })
}

export function getTaskApi (id) {
  return ajax({
    url: 'task/' + id
  })
}

export function UserApi (id) {
  return ajax({
    url: 'user/' + id
  })
}

export function editActiveApi (id, active) {
  return ajax({
    url: 'user/' + id,
    method: 'patch',
    data: {
      active
    }
  })
}

export function editUserApi (id, data) {
  return ajax({
    url: 'user/' + id,
    method: 'patch',
    data
  })
}

export function editMessageApi (id, message) {
  return ajax({
    url: '/user/' + id,
    method: 'patch',
    data: {
      message
    }
  })
}
